package client;

import kit.SortTestHelper;
import sort.SelectionSort;
import util.SelectionSortUtil;

public class TestSelectionSort {
	
	public static void main(String[] args) {
//		int[] arrInt = {10,9,8,7,6,5,4,3,2,1};
		int[] arrInt = SortTestHelper.generateRandomArray(30, 100, 1000);
		SelectionSortUtil.sort(arrInt, arrInt.length);
		for(int a : arrInt){
			System.out.print(String.format("%d ", a));
		}
		System.out.println();
		
		char[] arrChar = {'A','F','B','C','Z','G'};
		SelectionSortUtil.sort(arrChar, arrChar.length);
		for(char a : arrChar){
			System.out.print(String.format("%s ", a));
		}
		System.out.println();
		
//		test01();
	}
	
	public static void test01(){
		TestSelectionSort tss = new TestSelectionSort();
		Integer[] arrInt = {10,9,8,7,6,5,4,3,2,1};
		SelectionSort<Integer> ssInt = new SelectionSort<Integer>();
		ssInt.sort(arrInt, arrInt.length);
		tss.console(arrInt);
		
		Character[] arrChar = {'A','F','B','C','Z','G'};
		SelectionSort<Character> ssChar = new SelectionSort<Character>();
		ssChar.sort(arrChar, arrChar.length);
		tss.console(arrChar);
	}
	
	public void console(Object[] arr){
		for(Object o : arr){
			System.out.print(o);
			System.out.print(" ");
		}
		System.out.println();
	}
}
